import java.util.*;
public class migong {
    static int n,m;
    static int N=5;
    static int g[][]=new int[N][N];
    static int d[][]= new int[N][N];
    Queue<Integer> queue = new LinkedList<Integer>();

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        for(int i=0;i<n;i++){
            for(int j=0;j<n;j++){
                g[i][j]=sc.nextInt();
            }
        }
        
    }
    static int bfsmigong(){
        int hh=0,tt=0;










        return 1;
    }
}
